﻿using System;
using MoonSharp.Interpreter;
using UnityEngine;

namespace Lua
{
	// Token: 0x020002F8 RID: 760
	[MoonSharpUserData]
	public class Quaternion
	{
		// Token: 0x06001287 RID: 4743 RVA: 0x0008154C File Offset: 0x0007F74C
		[MoonSharpHidden]
		public Quaternion(Quaternion quaternion)
		{
			this.quaternion = quaternion;
		}

		// Token: 0x170002CA RID: 714
		// (get) Token: 0x06001288 RID: 4744 RVA: 0x0008155B File Offset: 0x0007F75B
		// (set) Token: 0x06001289 RID: 4745 RVA: 0x00081568 File Offset: 0x0007F768
		public float w
		{
			get
			{
				return this.quaternion.w;
			}
			set
			{
				this.quaternion.w = value;
			}
		}

		// Token: 0x170002CB RID: 715
		// (get) Token: 0x0600128A RID: 4746 RVA: 0x00081576 File Offset: 0x0007F776
		// (set) Token: 0x0600128B RID: 4747 RVA: 0x00081583 File Offset: 0x0007F783
		public float x
		{
			get
			{
				return this.quaternion.x;
			}
			set
			{
				this.quaternion.x = value;
			}
		}

		// Token: 0x170002CC RID: 716
		// (get) Token: 0x0600128C RID: 4748 RVA: 0x00081591 File Offset: 0x0007F791
		// (set) Token: 0x0600128D RID: 4749 RVA: 0x0008159E File Offset: 0x0007F79E
		public float y
		{
			get
			{
				return this.quaternion.y;
			}
			set
			{
				this.quaternion.y = value;
			}
		}

		// Token: 0x170002CD RID: 717
		// (get) Token: 0x0600128E RID: 4750 RVA: 0x000815AC File Offset: 0x0007F7AC
		// (set) Token: 0x0600128F RID: 4751 RVA: 0x000815B9 File Offset: 0x0007F7B9
		public float z
		{
			get
			{
				return this.quaternion.z;
			}
			set
			{
				this.quaternion.z = value;
			}
		}

		// Token: 0x170002CE RID: 718
		// (get) Token: 0x06001290 RID: 4752 RVA: 0x000815C7 File Offset: 0x0007F7C7
		public Vector3 eulerAngles
		{
			get
			{
				return new Vector3(this.quaternion.eulerAngles);
			}
		}

		// Token: 0x170002CF RID: 719
		// (get) Token: 0x06001291 RID: 4753 RVA: 0x000815D9 File Offset: 0x0007F7D9
		public static Quaternion identity
		{
			get
			{
				return new Quaternion(Quaternion.identity);
			}
		}

		// Token: 0x06001292 RID: 4754 RVA: 0x000815E5 File Offset: 0x0007F7E5
		public static Quaternion New(float x, float y, float z, float w)
		{
			return new Quaternion(new Quaternion(x, y, z, w));
		}

		// Token: 0x06001293 RID: 4755 RVA: 0x000815F5 File Offset: 0x0007F7F5
		public override string ToString()
		{
			return this.quaternion.ToString();
		}

		// Token: 0x06001294 RID: 4756 RVA: 0x00081608 File Offset: 0x0007F808
		[MoonSharpUserDataMetamethod("__concat")]
		public static string Concat(Quaternion o, string s)
		{
			return o.ToString() + s;
		}

		// Token: 0x06001295 RID: 4757 RVA: 0x00081616 File Offset: 0x0007F816
		[MoonSharpUserDataMetamethod("__concat")]
		public static string Concat(string s, Quaternion o)
		{
			return s + o.ToString();
		}

		// Token: 0x06001296 RID: 4758 RVA: 0x00081624 File Offset: 0x0007F824
		[MoonSharpUserDataMetamethod("__concat")]
		public static string Concat(Quaternion o1, Quaternion o2)
		{
			return o1.ToString() + o2.ToString();
		}

		// Token: 0x06001297 RID: 4759 RVA: 0x00081637 File Offset: 0x0007F837
		[MoonSharpUserDataMetamethod("__eq")]
		public static bool Eq(Quaternion o1, Quaternion o2)
		{
			return o1.quaternion == o2.quaternion;
		}

		// Token: 0x06001298 RID: 4760 RVA: 0x0008164A File Offset: 0x0007F84A
		public static Quaternion operator *(Quaternion lhs, Quaternion rhs)
		{
			return new Quaternion(lhs.quaternion * rhs.quaternion);
		}

		// Token: 0x06001299 RID: 4761 RVA: 0x00081662 File Offset: 0x0007F862
		public static Vector3 operator *(Quaternion rotation, Vector3 vector)
		{
			return new Vector3(rotation.quaternion * vector.vector3);
		}

		// Token: 0x0600129A RID: 4762 RVA: 0x0008167A File Offset: 0x0007F87A
		public void Set(float x, float y, float z, float w)
		{
			this.quaternion.Set(x, y, z, w);
		}

		// Token: 0x0600129B RID: 4763 RVA: 0x0008168C File Offset: 0x0007F88C
		public void SetFromToRotation(Vector3 fromDirection, Vector3 toDirection)
		{
			this.quaternion.SetFromToRotation(fromDirection.vector3, toDirection.vector3);
		}

		// Token: 0x0600129C RID: 4764 RVA: 0x000816A5 File Offset: 0x0007F8A5
		public void SetLookRotation(Vector3 view)
		{
			this.quaternion.SetLookRotation(view.vector3);
		}

		// Token: 0x0600129D RID: 4765 RVA: 0x000816B8 File Offset: 0x0007F8B8
		public void SetLookRotation(Vector3 view, Vector3 up)
		{
			this.quaternion.SetLookRotation(view.vector3, up.vector3);
		}

		// Token: 0x0600129E RID: 4766 RVA: 0x000816D1 File Offset: 0x0007F8D1
		public static float Angle(Quaternion a, Quaternion b)
		{
			return Quaternion.Angle(a.quaternion, b.quaternion);
		}

		// Token: 0x0600129F RID: 4767 RVA: 0x000816E4 File Offset: 0x0007F8E4
		public static Quaternion AngleAxis(float angle, Vector3 axis)
		{
			return new Quaternion(Quaternion.AngleAxis(angle, axis.vector3));
		}

		// Token: 0x060012A0 RID: 4768 RVA: 0x000816F7 File Offset: 0x0007F8F7
		public static float Dot(Quaternion a, Quaternion b)
		{
			return Quaternion.Dot(a.quaternion, b.quaternion);
		}

		// Token: 0x060012A1 RID: 4769 RVA: 0x0008170A File Offset: 0x0007F90A
		public static Quaternion Euler(float x, float y, float z)
		{
			return new Quaternion(Quaternion.Euler(x, y, z));
		}

		// Token: 0x060012A2 RID: 4770 RVA: 0x00081719 File Offset: 0x0007F919
		public static Quaternion Euler(Vector3 euler)
		{
			return new Quaternion(Quaternion.Euler(euler.vector3));
		}

		// Token: 0x060012A3 RID: 4771 RVA: 0x0008172B File Offset: 0x0007F92B
		public static Quaternion FromToRotation(Vector3 fromDirection, Vector3 toDirection)
		{
			return new Quaternion(Quaternion.FromToRotation(fromDirection.vector3, toDirection.vector3));
		}

		// Token: 0x060012A4 RID: 4772 RVA: 0x00081743 File Offset: 0x0007F943
		public static Quaternion Inverse(Quaternion rotation)
		{
			return new Quaternion(Quaternion.Inverse(rotation.quaternion));
		}

		// Token: 0x060012A5 RID: 4773 RVA: 0x00081755 File Offset: 0x0007F955
		public static Quaternion Lerp(Quaternion a, Quaternion b, float t)
		{
			return new Quaternion(Quaternion.Lerp(a.quaternion, b.quaternion, t));
		}

		// Token: 0x060012A6 RID: 4774 RVA: 0x0008176E File Offset: 0x0007F96E
		public static Quaternion LerpUnclamped(Quaternion a, Quaternion b, float t)
		{
			return new Quaternion(Quaternion.LerpUnclamped(a.quaternion, b.quaternion, t));
		}

		// Token: 0x060012A7 RID: 4775 RVA: 0x00081787 File Offset: 0x0007F987
		public static Quaternion LookRotation(Vector3 forward)
		{
			return new Quaternion(Quaternion.LookRotation(forward.vector3));
		}

		// Token: 0x060012A8 RID: 4776 RVA: 0x00081799 File Offset: 0x0007F999
		public static Quaternion LookRotation(Vector3 forward, Vector3 upwards)
		{
			return new Quaternion(Quaternion.LookRotation(forward.vector3, upwards.vector3));
		}

		// Token: 0x060012A9 RID: 4777 RVA: 0x000817B1 File Offset: 0x0007F9B1
		public static Quaternion RotateTowards(Quaternion from, Quaternion to, float maxDegreesDelta)
		{
			return new Quaternion(Quaternion.RotateTowards(from.quaternion, to.quaternion, maxDegreesDelta));
		}

		// Token: 0x060012AA RID: 4778 RVA: 0x000817CA File Offset: 0x0007F9CA
		public static Quaternion Slerp(Quaternion a, Quaternion b, float t)
		{
			return new Quaternion(Quaternion.Slerp(a.quaternion, b.quaternion, t));
		}

		// Token: 0x060012AB RID: 4779 RVA: 0x000817E3 File Offset: 0x0007F9E3
		public static Quaternion SlerpUnclamped(Quaternion a, Quaternion b, float t)
		{
			return new Quaternion(Quaternion.SlerpUnclamped(a.quaternion, b.quaternion, t));
		}

		// Token: 0x040016D4 RID: 5844
		[MoonSharpHidden]
		public Quaternion quaternion;
	}
}
